<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class DeleteSnappedTypeSnappedTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('snapped', function (Blueprint $table) {
            //

            $table->dropColumn('snapped_type');

            $table->dropColumn('price');

            $table->dropColumn('percent');


        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('snapped', function (Blueprint $table) {
            //

            $table->integer('snapped_type')->unsigned()->comment('全局秒杀类型，1是价格，2是折扣');

            $table->decimal('price')->unsigned()->comment('全局秒杀价格');

            $table->decimal('percent')->unsigned()->comment('全局折扣(单位折)');
        });
    }
}
